Birthweight Prediction

Final Project
Data Science 2 with R (STAT 301-2)

Author

Cassie Lee

Published

March 4, 2024

Introduction

The developmental origins of health and disease (DOHaD) is a framework that seeks to link exposures to stressors during windows of susceptibility to the development of non-communicable diseases later in life (Lacagnina 2019). Birthweight has historically been used as an indicator of adverse early life exposures to stressors due to the relative ease of collecting birthweight data (Hanson 2015). Low birthweight is a risk factor for developing non-communicable diseases later in life such as cardiovascular diseases, metabolic diseases, and kidney diseases (Bianchi and Restrepo 2022).

Lacagnina, Salvatore. 2019. “The Developmental Origins of Health and Disease (DOHaD).” American Journal of Lifestyle Medicine 14 (1): 47–50. https://doi.org/10.1177/1559827619879694.
Hanson, M. 2015. “The Birth and Future Health of DOHaD.” Journal of Developmental Origins of Health and Disease 6 (5): 434–37. https://doi.org/10.1017/S2040174415001129.
Bianchi, Maria Eugenia, and Jaime M. Restrepo. 2022. “Low Birthweight as a Risk Factor for Non-Communicable Diseases in Adults.” Frontiers in Medicine 8. https://doi.org/https://doi.org/10.3389/fmed.2021.793990.

Objective

The objective of this prediction problem is to create a model to predict the birthweight of an infant given a certain set of characteristics. This is a regression problem. Having a prediction model for this problem can be useful in providing insights to eventually developing an inferential question that identifies the most important factors associated with birthweight.

A classification problem to predict whether or not an infant would be born with low birthweight was not feasible with the dataset used because of high class imbalance. Only about 10% of observations in the dataset would have been classified as low birthweight, which is births under 2,500 grams (Hughes, Black, and Katz 2017).

Hughes, Michelle M., Robert E. Black, and Joanne Katz. 2017. “2500-g Low Birth Weight Cutoff: History and Implications for Future Research and Policy.” Maternal and Child Health Journal 21 (2): 283–89. https://doi.org/10.1007/s10995-016-2131-9.

Data Source

I downloaded the Kaggle dataset, US births (2018) (Amol Deshmukh 2020). The creator of this dataset subsetted this data from the raw 2018 natality file available from the Vital Statistics Online Data Portal (National Center for Health Statistics 2023).

Amol Deshmukh. 2020. “US Births (2018).” https://www.kaggle.com/datasets/des137/us-births-2018.
National Center for Health Statistics. 2023. “Vital Statistics Online Data Portal.” https://www.cdc.gov/nchs/data_access/vitalstatsonline.htm.
  • 1 Kaggle competition

  • I chose this specific dataset because I searched Kaggle for a dataset relating to birthweight and found the Kaggle competition, Prediction interval competition I: Birthweight1 by Carl McBride Ellis. Ellis cited the US births (2018) dataset as its source. I downloaded the US births (2018) dataset to have access to the the full dataset and have more control over the amount of observations I used for exploratory data analysis, the training data, and the testing data.

    The prediction interval competition identified 39 predictors to use, however, due to computational limitations, I selected 20 variables from this list. This selection was done by selecting only variables related to the conditions related to pregnancy — for example, weight gain during pregnancy — and dropping conditions related to birth — for example, the type of facility the birth occurred in.

    Data Overview

    The US births (2018) dataset has over 3 million observations. Due to computational limitations, I subsetted 30,000 observations, using 15,000 for an exploratory data analysis and 15,000 for model fitting and testing.

    Because I had the ability to subset from over 3 million observations, I was able to filter out incomplete observations before randomly sampling a total of 30,000 observations. Therefore, I do not have any major missingness issues. Table 1 shows the results of the missingness analysis. This analysis contains observations used in exploratory data analysis, model fitting and tuning, and tesing. Variables are ordered from the greatest to least missing observations, with only the first five variables shown.

    Although there are not major missingness issues, Table 1 shows that interval since last pregnancy (ilp_r), interval since last birth (illb_r), and which month of pregnancy the mother began prenatal care (precare) have several missing values. I created missingness in these variables because the original data collection encoded multiple types of information under the same variable.

    For the interval since last pregnancy and last birth, if the mother had a plural delivery, the interval since the last birth was encoded as the number of infants (0 to 3) the mother had at the time of birth. From this information, I created a logical variable to identify whether or not the birth was a plural delivery and recoded the interval since last birth and last pregnancy as missing. Similarly, if this was the mother’s first birth or first pregnancy, the interval since last birth and last pregnancy was encoded as 888. From this information, I created two logical variables to identify whether or not this was the mother’s first birth or first pregnancy and recoded the interval since last birth and last pregnancy as missing. For which month of pregnancy the mother began prenatal care, 00 was recorded if the mother did not receive any prenatal care. From this information, I created a logical variable to identify whether or not the mother received prenatal care and recoded the month of pregnancy the mother began prenatal care as missing. I could not filter out these observations due to the information they contained, even as “missing” variables. All other variables are complete.

    Table 1: Missingness analysis conducted on 30,000 randomly sampled observations.
    skim_variable n_missing complete_rate
    ilp_r 368 0.9877333
    illb_r 367 0.9877667
    precare 308 0.9897333
    feduc 0 1.0000000
    meduc 0 1.0000000

    A univariate analysis of birthweight across the 30,000 randomly sampled observations shows a fairly normal distribution, so no transformation will be needed to use birthweight in this prediction problem. Figure 1 shows the distribution of birthweights, highlighting the outliers for babies that were both unusually light and unusually heavy. This distribution is as expected with physiological constraints on both very small and very large infants.

    Figure 1: Target variable analysis conducted on 30,000 randomly sampled observations.

    I performed a short exploratory data analysis using the 15,000 observations set aside for this purpose. This analysis was used to inform both the base recipe and feature engineering in a second unique recipe.

    I conducted bivariate analyses between each of the predictor and birthweight. Only a few of the predictors showed interesting relationships with birthweight. Figure 2, Figure 3, Figure 4, Figure 5, Figure 6, and Figure 7 show the relationships between birthweight and the predictors that have more interesting relationships. Figures for the other relationships can be found in the appendix.

    Figure 2: Plural delivery
    Figure 3: Daily cigarettes before pregancy
    Figure 4: Mother’s height
    Figure 5: Mother’s weight before pregnancy
    Figure 6: Number of prenatal visits
    Figure 7: Weight gain during pregnancy

    I also explored correlation between numeric predictors to identify co-linearity, shown in Figure 8. There are a few predictors that are highly correlated with each other, such as the age of the mother and the age of the father, as well as the number of prior births who are still alive and the interval since the last birth and last pregnancy. I do not address these co-linearities in the basic recipe because they are not perfectly co-linear. However, in the second recipe, I do not include the the age of the father or the number of prior births who are still alive, so these co-linearities are not an issue.

    Figure 8: Correlation matrix between numeric predictors

    Methods

    Model Building and Selection

    Final Model Analysis

    Conclusion

    References

    Appendix: Exploratory Data Analysis